<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>

<body>
    <!-- <p>原生</p>
    <div>
        <p id='title'></p>
        <input id='input'>
    </div>
    <script>
        var p = document.querySelector('#title')
        var input = document.querySelector('#input')
        var message = 'hello word'
        input.value = message
        p.innerText = message
        // 监听
        input.addEventListener('keyup', function (e) {
            message = e.target.value
            p.innerText = e.target.value
        })
        // 更改
        function reactMessage() {
            input.value = message
            p.innerText = message
        }
    </script> -->
    <p>vue</p>
    <div id="app">
        <p>{{ message }}</p>
        <input v-model="message">
    </div> 
    <script>
        var selfV= new Vue({
            el: '#app',
            data: {
                message: 'sdsdsd'
            }
        })
    </script>
</body>

</html>